#ifndef TILE_HPP_INCLUDED
#define TILE_HPP_INCLUDED

#include <vector>

#include <boost/shared_ptr.hpp>

#include "terrain_fwd.hpp"
#include "texture.hpp"
#include "tile_logic.hpp"

namespace hex {

class tile {
public:
	tile(const location& loc, const_terrain_ptr terrain);

	void set_adjacent(const tile** adj);

	void draw() const;
	void draw_overlay() const;

	const_terrain_ptr terrain() const { return terrain_; }
private:
	location loc_;
	const_terrain_ptr terrain_;

	const tile* adjacent_[6];

	std::vector<graphics::texture> textures_;
	std::vector<graphics::texture> overlays_;
};

typedef boost::shared_ptr<tile> tile_ptr;
typedef boost::shared_ptr<const tile> const_tile_ptr;

}

#endif
